package com.gotloop.jpa;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class Vote {

	@Id
	private Long uid;
	
	/**
	 * Negative or positive vote value
	 */
	private int value;
	
	@ManyToOne
	private UserProfile voter;
	
	@ManyToOne(fetch=FetchType.LAZY,optional=true)
	private Comment comment;

	@ManyToOne(fetch=FetchType.LAZY,optional=true)
	private Loop loop;

	private Date creation;
}
